import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login.vue'
import Home from '@/components/Home.vue'
import List from '@/components/List.vue'
import User from '@/components/User.vue'
import Add from '@/components/Add.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component:Login 
    },
    {
    	path:'/home',
    	name:'home',
    	component:Home,
    	children:[{
    		path:'list',
    		name:'list',
    		component:List
    	},
    	{
    		path:'user',
    		name:'user',
    		component:User
    	}
    	]
    },
    {
    	path:'/add',
    	name:'add',
    	component:Add
    }
  ]
})
